package com.nbsaas.boot.intelligent_erp.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 智能推荐实体类
 * 
 * @author 系统生成
 */
@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "智能推荐", model = "智能推荐")
@Entity
@Table(name = "bs_smart_recommendation")
@Comment("智能推荐表")
public class SmartRecommendation extends AbstractEntity {

    @Comment("推荐类型")
    @SearchItem(name = "recommendationType", key = "recommendationType", label = "推荐类型")
    @FormField(title = "推荐类型", sortNum = "1", grid = true, type = InputType.select)
    @Column(name = "recommendation_type", length = 50)
    private String recommendationType; // PRODUCT-商品推荐, SUPPLIER-供应商推荐, PRICE-价格推荐, INVENTORY-库存推荐, PRODUCTION-生产推荐

    @Comment("目标用户ID")
    @FormField(title = "目标用户ID", sortNum = "2", grid = true)
    @Column(name = "target_user_id")
    private Long targetUserId;

    @Comment("推荐对象ID")
    @FormField(title = "推荐对象ID", sortNum = "3", grid = true)
    @Column(name = "recommended_object_id")
    private Long recommendedObjectId;

    @Comment("推荐对象名称")
    @FormField(title = "推荐对象名称", sortNum = "4", grid = true)
    @Column(name = "recommended_object_name", length = 200)
    private String recommendedObjectName;

    @Comment("推荐分数")
    @FormField(title = "推荐分数", sortNum = "5", grid = true, type = InputType.el_input_number)
    @Column(name = "recommendation_score", precision = 5, scale = 2)
    private BigDecimal recommendationScore;

    @Comment("推荐原因")
    @FormField(title = "推荐原因", sortNum = "6", type = InputType.textarea)
    @Column(name = "recommendation_reason", length = 1000)
    private String recommendationReason;

    @Comment("推荐状态")
    @FormField(title = "推荐状态", sortNum = "7", grid = true, type = InputType.select)
    @Column(name = "recommendation_status", length = 20)
    private String recommendationStatus; // PENDING-待处理, ACCEPTED-已接受, REJECTED-已拒绝, EXPIRED-已过期

    @Comment("推荐时间")
    @FormField(title = "推荐时间", sortNum = "8", type = InputType.date, grid = true)
    @Column(name = "recommendation_time")
    private Date recommendationTime;

    @Comment("处理时间")
    @FormField(title = "处理时间", sortNum = "9", type = InputType.date, grid = true)
    @Column(name = "process_time")
    private Date processTime;

    @Comment("算法类型")
    @FormField(title = "算法类型", sortNum = "10", grid = true, type = InputType.select)
    @Column(name = "algorithm_type", length = 50)
    private String algorithmType; // COLLABORATIVE_FILTERING-协同过滤, CONTENT_BASED-基于内容, HYBRID-混合算法

    @Comment("推荐描述")
    @FormField(title = "推荐描述", sortNum = "11", type = InputType.textarea)
    @Column(name = "description", length = 1000)
    private String description;
} 